package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"go-study/gin/routers"
)

func main() {
	r := gin.Default()
	r.LoadHTMLGlob("templates/**/*")
	r.Static("/static", "static")

	routers.DefaultRouter(r)
	routers.ParamRouter(r)

	err := r.Run(":8000") // 监听并在 0.0.0.0:8080 上启动服务
	if err != nil {
		fmt.Println("启动失败", err)
	}
}
